<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Module: Vertx
  
    &mdash; Ruby API Doc
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '';
  framesUrl = "frames.html#!" + escape(window.location.href);
</script>


  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (V)</a> &raquo;
    
    
    <span class="title">Vertx</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Module: Vertx
  
  
  
</h1>

<dl class="box">
  
  
    
  
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">src/main/api_shim/core/timers.rb<span class="defines">,<br />
  src/main/api_shim/core/net.rb,<br /> src/main/api_shim/container.rb,<br /> src/main/api_shim/core/http.rb,<br /> src/main/api_shim/core/buffer.rb,<br /> src/main/api_shim/core/streams.rb,<br /> src/main/api_shim/core/sock_js.rb,<br /> src/main/api_shim/core/event_bus.rb,<br /> src/main/api_shim/core/parsetools.rb,<br /> src/main/api_shim/core/tcp_support.rb,<br /> src/main/api_shim/core/shared_data.rb,<br /> src/main/api_shim/core/ssl_support.rb,<br /> src/main/api_shim/core/file_system.rb,<br /> src/main/api_shim/core/wrapped_handler.rb</span>
</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    Copyright 2011-2012 the original author or authors.

Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

  </div>
</div>
<div class="tags">
  

</div><h2>Defined Under Namespace</h2>
<p class="children">
  
    
      <strong class="modules">Modules:</strong> <span class='object_link'><a href="Vertx/ClientSSLSupport.html" title="Vertx::ClientSSLSupport (module)">ClientSSLSupport</a></span>, <span class='object_link'><a href="Vertx/ReadStream.html" title="Vertx::ReadStream (module)">ReadStream</a></span>, <span class='object_link'><a href="Vertx/SSLSupport.html" title="Vertx::SSLSupport (module)">SSLSupport</a></span>, <span class='object_link'><a href="Vertx/ServerSSLSupport.html" title="Vertx::ServerSSLSupport (module)">ServerSSLSupport</a></span>, <span class='object_link'><a href="Vertx/ServerTCPSupport.html" title="Vertx::ServerTCPSupport (module)">ServerTCPSupport</a></span>, <span class='object_link'><a href="Vertx/TCPSupport.html" title="Vertx::TCPSupport (module)">TCPSupport</a></span>, <span class='object_link'><a href="Vertx/WriteStream.html" title="Vertx::WriteStream (module)">WriteStream</a></span>
    
  
    
      <strong class="classes">Classes:</strong> <span class='object_link'><a href="Vertx/AsyncFile.html" title="Vertx::AsyncFile (class)">AsyncFile</a></span>, <span class='object_link'><a href="Vertx/Buffer.html" title="Vertx::Buffer (class)">Buffer</a></span>, <span class='object_link'><a href="Vertx/Context.html" title="Vertx::Context (class)">Context</a></span>, <span class='object_link'><a href="Vertx/EventBus.html" title="Vertx::EventBus (class)">EventBus</a></span>, <span class='object_link'><a href="Vertx/FSProps.html" title="Vertx::FSProps (class)">FSProps</a></span>, <span class='object_link'><a href="Vertx/FileProps.html" title="Vertx::FileProps (class)">FileProps</a></span>, <span class='object_link'><a href="Vertx/FileSystem.html" title="Vertx::FileSystem (class)">FileSystem</a></span>, <span class='object_link'><a href="Vertx/HttpClient.html" title="Vertx::HttpClient (class)">HttpClient</a></span>, <span class='object_link'><a href="Vertx/HttpClientRequest.html" title="Vertx::HttpClientRequest (class)">HttpClientRequest</a></span>, <span class='object_link'><a href="Vertx/HttpClientResponse.html" title="Vertx::HttpClientResponse (class)">HttpClientResponse</a></span>, <span class='object_link'><a href="Vertx/HttpServer.html" title="Vertx::HttpServer (class)">HttpServer</a></span>, <span class='object_link'><a href="Vertx/HttpServerFileUpload.html" title="Vertx::HttpServerFileUpload (class)">HttpServerFileUpload</a></span>, <span class='object_link'><a href="Vertx/HttpServerRequest.html" title="Vertx::HttpServerRequest (class)">HttpServerRequest</a></span>, <span class='object_link'><a href="Vertx/HttpServerResponse.html" title="Vertx::HttpServerResponse (class)">HttpServerResponse</a></span>, <span class='object_link'><a href="Vertx/Message.html" title="Vertx::Message (class)">Message</a></span>, <span class='object_link'><a href="Vertx/MultiMap.html" title="Vertx::MultiMap (class)">MultiMap</a></span>, <span class='object_link'><a href="Vertx/NetClient.html" title="Vertx::NetClient (class)">NetClient</a></span>, <span class='object_link'><a href="Vertx/NetServer.html" title="Vertx::NetServer (class)">NetServer</a></span>, <span class='object_link'><a href="Vertx/NetSocket.html" title="Vertx::NetSocket (class)">NetSocket</a></span>, <span class='object_link'><a href="Vertx/Pump.html" title="Vertx::Pump (class)">Pump</a></span>, <span class='object_link'><a href="Vertx/RecordParser.html" title="Vertx::RecordParser (class)">RecordParser</a></span>, <span class='object_link'><a href="Vertx/RouteMatcher.html" title="Vertx::RouteMatcher (class)">RouteMatcher</a></span>, <span class='object_link'><a href="Vertx/ServerWebSocket.html" title="Vertx::ServerWebSocket (class)">ServerWebSocket</a></span>, <span class='object_link'><a href="Vertx/SharedData.html" title="Vertx::SharedData (class)">SharedData</a></span>, <span class='object_link'><a href="Vertx/SockJSServer.html" title="Vertx::SockJSServer (class)">SockJSServer</a></span>, <span class='object_link'><a href="Vertx/SockJSSocket.html" title="Vertx::SockJSSocket (class)">SockJSSocket</a></span>, <span class='object_link'><a href="Vertx/WebSocket.html" title="Vertx::WebSocket (class)">WebSocket</a></span>
    
  
</p>

  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="j_vertx-classvariable" class="">@@j_vertx =
          
        </dt>
        <dd><pre class="code"><span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
</pre></dd>
      
    </dl>
  







  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#cancel_timer-class_method" title="cancel_timer (class method)">+ (Boolean) <strong>cancel_timer</strong>(id) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Cancels a timer.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#config-class_method" title="config (class method)">+ (Hash) <strong>config</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get config for the verticle.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#current_context-class_method" title="current_context (class method)">+ (Object) <strong>current_context</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get a reference to the current context.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#deploy_module-class_method" title="deploy_module (class method)">+ (Object) <strong>deploy_module</strong>(module_name, config = nil, instances = 1, &amp;block) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Deploy a module.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#deploy_verticle-class_method" title="deploy_verticle (class method)">+ (Object) <strong>deploy_verticle</strong>(main, config = nil, instances = 1, &amp;block) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Deploy a verticle.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#deploy_worker_verticle-class_method" title="deploy_worker_verticle (class method)">+ (Object) <strong>deploy_worker_verticle</strong>(main, config = nil, instances = 1, multi_threaded = false, &amp;block) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Deploy a worker verticle.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#env-class_method" title="env (class method)">+ (Hash) <strong>env</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get the environment for the verticle.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#exit-class_method" title="exit (class method)">+ (Object) <strong>exit</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Cause the container to exit.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#logger-class_method" title="logger (class method)">+ (Logger) <strong>logger</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Get the logger for the verticle.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#run_on_context-class_method" title="run_on_context (class method)">+ (Object) <strong>run_on_context</strong>(proc = nil, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Put the handler on the event queue for this loop so it will be run asynchronously
ASAP after this event has been processed.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#set_periodic-class_method" title="set_periodic (class method)">+ (FixNum) <strong>set_periodic</strong>(delay, proc = nil, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Sets a periodic timer.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#set_timer-class_method" title="set_timer (class method)">+ (FixNum) <strong>set_timer</strong>(delay, proc = nil, &amp;hndlr) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Sets a one-shot timer that will fire after a certain delay.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#undeploy_module-class_method" title="undeploy_module (class method)">+ (Object) <strong>undeploy_module</strong>(id, &amp;block) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Undeploy a module
as the first parameter if undeploy failed.</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#undeploy_verticle-class_method" title="undeploy_verticle (class method)">+ (Object) <strong>undeploy_verticle</strong>(id, &amp;block) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>Undeploy a verticle
as the first parameter if undeploy failed.</div></span>
  
</li>

      
    </ul>
  



  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="cancel_timer-class_method">
  
    + (<tt>Boolean</tt>) <strong>cancel_timer</strong>(id) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Cancels a timer.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>id</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>the id of the timer, as returned from <span class='object_link'><a href="#set_timer-class_method" title="Vertx.set_timer (method)">set_timer</a></span> or <span class='object_link'><a href="#set_periodic-class_method" title="Vertx.set_periodic (method)">set_periodic</a></span></div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>true if the timer was cancelled, false if it wasn't found.</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


44
45
46</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/timers.rb', line 44</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_cancel_timer identifier id'>cancel_timer</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='rparen token'>)</span>
  <span class='rubyid_@@j_vertx ivar id'>@@j_vertx</span><span class='dot token'>.</span><span class='rubyid_cancelTimer identifier id'>cancelTimer</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="config-class_method">
  
    + (<tt>Hash</tt>) <strong>config</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get config for the verticle

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The JSON config for the verticle</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


99
100
101
102
103
104
105</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 99</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span>
  <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_defined? defined kw'>defined?</span> <span class='rubyid_@@j_conf ivar id'>@@j_conf</span>
    <span class='rubyid_@@j_conf ivar id'>@@j_conf</span> <span class='assign token'>=</span> <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span>
    <span class='rubyid_@@j_conf ivar id'>@@j_conf</span> <span class='assign token'>=</span> <span class='rubyid_JSON constant id'>JSON</span><span class='dot token'>.</span><span class='rubyid_parse identifier id'>parse</span><span class='lparen token'>(</span><span class='rubyid_@@j_conf ivar id'>@@j_conf</span><span class='dot token'>.</span><span class='rubyid_encode identifier id'>encode</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_@@j_conf ivar id'>@@j_conf</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_@@j_conf ivar id'>@@j_conf</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="current_context-class_method">
  
    + (<tt>Object</tt>) <strong>current_context</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get a reference to the current context

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


58
59
60</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/timers.rb', line 58</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_current_context identifier id'>current_context</span>
  <span class='rubyid_Context constant id'>Context</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_@@j_vertx ivar id'>@@j_vertx</span><span class='dot token'>.</span><span class='rubyid_currentContext identifier id'>currentContext</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="deploy_module-class_method">
  
    + (<tt>Object</tt>) <strong>deploy_module</strong>(module_name, config = nil, instances = 1, &amp;block) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Deploy a module. The actual deploy happens asynchronously
the block will be an exception or nil if no failure occurred, the second parameter will be the deployment id

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>module_name</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The name of the module to deploy</div>
      
    </li>
  
    <li>
      
        <span class='name'>config</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'>JSON configuration for the module</div>
      
    </li>
  
    <li>
      
        <span class='name'>instances</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>1</tt>)</em>
      
      
        &mdash;
        <div class='inline'>Number of instances to deploy</div>
      
    </li>
  
    <li>
      
        <span class='name'>block</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>Block will be executed when deploy has completed - the first parameter passed to</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


59
60
61
62
63
64
65
66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 59</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_deploy_module identifier id'>deploy_module</span><span class='lparen token'>(</span><span class='rubyid_module_name identifier id'>module_name</span><span class='comma token'>,</span> <span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_instances identifier id'>instances</span> <span class='assign token'>=</span> <span class='integer val'>1</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_config identifier id'>config</span>
    <span class='rubyid_json_str identifier id'>json_str</span> <span class='assign token'>=</span> <span class='rubyid_JSON constant id'>JSON</span><span class='dot token'>.</span><span class='rubyid_generate identifier id'>generate</span><span class='lparen token'>(</span><span class='rubyid_config identifier id'>config</span><span class='rparen token'>)</span>
    <span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_core identifier id'>core</span><span class='dot token'>.</span><span class='rubyid_json identifier id'>json</span><span class='dot token'>.</span><span class='rubyid_JsonObject constant id'>JsonObject</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_json_str identifier id'>json_str</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_block identifier id'>block</span>
    <span class='rubyid_block identifier id'>block</span> <span class='assign token'>=</span> <span class='rubyid_ARWrappedHandler constant id'>ARWrappedHandler</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_deployModule identifier id'>deployModule</span><span class='lparen token'>(</span><span class='rubyid_module_name identifier id'>module_name</span><span class='comma token'>,</span> <span class='rubyid_config identifier id'>config</span><span class='comma token'>,</span> <span class='rubyid_instances identifier id'>instances</span><span class='comma token'>,</span> <span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="deploy_verticle-class_method">
  
    + (<tt>Object</tt>) <strong>deploy_verticle</strong>(main, config = nil, instances = 1, &amp;block) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Deploy a verticle. The actual deploy happens asynchronously
the block will be an exception or nil if no failure occurred, the second parameter will be the deployment id

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>main</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The main of the verticle to deploy</div>
      
    </li>
  
    <li>
      
        <span class='name'>config</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'>JSON configuration for the verticle</div>
      
    </li>
  
    <li>
      
        <span class='name'>instances</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>1</tt>)</em>
      
      
        &mdash;
        <div class='inline'>Number of instances to deploy</div>
      
    </li>
  
    <li>
      
        <span class='name'>block</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>Block will be executed when deploy has completed - the first parameter passed to</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


25
26
27
28
29
30
31
32
33
34</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 25</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_deploy_verticle identifier id'>deploy_verticle</span><span class='lparen token'>(</span><span class='rubyid_main identifier id'>main</span><span class='comma token'>,</span> <span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_instances identifier id'>instances</span> <span class='assign token'>=</span> <span class='integer val'>1</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_config identifier id'>config</span>
    <span class='rubyid_json_str identifier id'>json_str</span> <span class='assign token'>=</span> <span class='rubyid_JSON constant id'>JSON</span><span class='dot token'>.</span><span class='rubyid_generate identifier id'>generate</span><span class='lparen token'>(</span><span class='rubyid_config identifier id'>config</span><span class='rparen token'>)</span>
    <span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_core identifier id'>core</span><span class='dot token'>.</span><span class='rubyid_json identifier id'>json</span><span class='dot token'>.</span><span class='rubyid_JsonObject constant id'>JsonObject</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_json_str identifier id'>json_str</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_block identifier id'>block</span>
    <span class='rubyid_block identifier id'>block</span> <span class='assign token'>=</span> <span class='rubyid_ARWrappedHandler constant id'>ARWrappedHandler</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_deployVerticle identifier id'>deployVerticle</span><span class='lparen token'>(</span><span class='rubyid_main identifier id'>main</span><span class='comma token'>,</span> <span class='rubyid_config identifier id'>config</span><span class='comma token'>,</span> <span class='rubyid_instances identifier id'>instances</span><span class='comma token'>,</span> <span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="deploy_worker_verticle-class_method">
  
    + (<tt>Object</tt>) <strong>deploy_worker_verticle</strong>(main, config = nil, instances = 1, multi_threaded = false, &amp;block) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Deploy a worker verticle. The actual deploy happens asynchronously
the block will be an exception or nil if no failure occurred, the second parameter will be the deployment id

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>main</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The main of the verticle to deploy</div>
      
    </li>
  
    <li>
      
        <span class='name'>config</span>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'>JSON configuration for the verticle</div>
      
    </li>
  
    <li>
      
        <span class='name'>instances</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>1</tt>)</em>
      
      
        &mdash;
        <div class='inline'>Number of instances to deploy</div>
      
    </li>
  
    <li>
      
        <span class='name'>block</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>Block will be executed when deploy has completed - the first parameter passed to</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


42
43
44
45
46
47
48
49
50
51</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 42</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_deploy_worker_verticle identifier id'>deploy_worker_verticle</span><span class='lparen token'>(</span><span class='rubyid_main identifier id'>main</span><span class='comma token'>,</span> <span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_instances identifier id'>instances</span> <span class='assign token'>=</span> <span class='integer val'>1</span><span class='comma token'>,</span> <span class='rubyid_multi_threaded identifier id'>multi_threaded</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_config identifier id'>config</span>
    <span class='rubyid_json_str identifier id'>json_str</span> <span class='assign token'>=</span> <span class='rubyid_JSON constant id'>JSON</span><span class='dot token'>.</span><span class='rubyid_generate identifier id'>generate</span><span class='lparen token'>(</span><span class='rubyid_config identifier id'>config</span><span class='rparen token'>)</span>
    <span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_core identifier id'>core</span><span class='dot token'>.</span><span class='rubyid_json identifier id'>json</span><span class='dot token'>.</span><span class='rubyid_JsonObject constant id'>JsonObject</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_json_str identifier id'>json_str</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_block identifier id'>block</span>
    <span class='rubyid_block identifier id'>block</span> <span class='assign token'>=</span> <span class='rubyid_ARWrappedHandler constant id'>ARWrappedHandler</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_deployWorkerVerticle identifier id'>deployWorkerVerticle</span><span class='lparen token'>(</span><span class='rubyid_main identifier id'>main</span><span class='comma token'>,</span> <span class='rubyid_config identifier id'>config</span><span class='comma token'>,</span> <span class='rubyid_instances identifier id'>instances</span><span class='comma token'>,</span> <span class='rubyid_multi_threaded identifier id'>multi_threaded</span><span class='comma token'>,</span> <span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="env-class_method">
  
    + (<tt>Hash</tt>) <strong>env</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get the environment for the verticle

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Hash</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>Get the environment for the verticle</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


108
109
110</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 108</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_env identifier id'>env</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_env identifier id'>env</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="exit-class_method">
  
    + (<tt>Object</tt>) <strong>exit</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Cause the container to exit

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


93
94
95</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 93</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_exit identifier id'>exit</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_exit identifier id'>exit</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="logger-class_method">
  
    + (<tt>Logger</tt>) <strong>logger</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Get the logger for the verticle

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Logger</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>Get the logger for the verticle</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


113
114
115</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 113</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_logger identifier id'>logger</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_logger identifier id'>logger</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="run_on_context-class_method">
  
    + (<tt>Object</tt>) <strong>run_on_context</strong>(proc = nil, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Put the handler on the event queue for this loop so it will be run asynchronously
ASAP after this event has been processed

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>proc</span>
      
      
        <span class='type'>(<tt>Proc</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'>a proc representing the code that will be run ASAP</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>a block representing the code that will be run ASAP</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


52
53
54
55</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/timers.rb', line 52</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_run_on_context identifier id'>run_on_context</span><span class='lparen token'>(</span><span class='rubyid_proc identifier id'>proc</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_hndlr identifier id'>hndlr</span> <span class='assign token'>=</span> <span class='rubyid_proc identifier id'>proc</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_proc identifier id'>proc</span>
  <span class='rubyid_@@j_vertx ivar id'>@@j_vertx</span><span class='dot token'>.</span><span class='rubyid_runOnContext identifier id'>runOnContext</span><span class='lparen token'>(</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="set_periodic-class_method">
  
    + (<tt>FixNum</tt>) <strong>set_periodic</strong>(delay, proc = nil, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Sets a periodic timer.
This method will accept either a Proc or a block.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>delay</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>the period of the timer, in milliseconds</div>
      
    </li>
  
    <li>
      
        <span class='name'>proc</span>
      
      
        <span class='type'>(<tt>Proc</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'>a proc representing the code that will be run when the timer fires</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>a block representing the code that will be when the timer fires</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>the unique id of the timer</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


36
37
38
39</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/timers.rb', line 36</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_set_periodic identifier id'>set_periodic</span><span class='lparen token'>(</span><span class='rubyid_delay identifier id'>delay</span><span class='comma token'>,</span> <span class='rubyid_proc identifier id'>proc</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_hndlr identifier id'>hndlr</span> <span class='assign token'>=</span> <span class='rubyid_proc identifier id'>proc</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_proc identifier id'>proc</span>
  <span class='rubyid_@@j_vertx ivar id'>@@j_vertx</span><span class='dot token'>.</span><span class='rubyid_setPeriodic identifier id'>setPeriodic</span><span class='lparen token'>(</span><span class='rubyid_delay identifier id'>delay</span><span class='comma token'>,</span> <span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="set_timer-class_method">
  
    + (<tt>FixNum</tt>) <strong>set_timer</strong>(delay, proc = nil, &amp;hndlr) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Sets a one-shot timer that will fire after a certain delay.
This method will accept either a Proc or a block.

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>delay</span>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>the delay, in milliseconds</div>
      
    </li>
  
    <li>
      
        <span class='name'>proc</span>
      
      
        <span class='type'>(<tt>Proc</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>nil</tt>)</em>
      
      
        &mdash;
        <div class='inline'>a proc representing the code that will be run after the delay</div>
      
    </li>
  
    <li>
      
        <span class='name'>hndlr</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>a block representing the code that will be run after the delay</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>FixNum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>the unique id of the timer</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


25
26
27
28</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/core/timers.rb', line 25</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_set_timer identifier id'>set_timer</span><span class='lparen token'>(</span><span class='rubyid_delay identifier id'>delay</span><span class='comma token'>,</span> <span class='rubyid_proc identifier id'>proc</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
  <span class='rubyid_hndlr identifier id'>hndlr</span> <span class='assign token'>=</span> <span class='rubyid_proc identifier id'>proc</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_proc identifier id'>proc</span>
  <span class='rubyid_@@j_vertx ivar id'>@@j_vertx</span><span class='dot token'>.</span><span class='rubyid_setTimer identifier id'>setTimer</span><span class='lparen token'>(</span><span class='rubyid_delay identifier id'>delay</span><span class='comma token'>,</span> <span class='rubyid_hndlr identifier id'>hndlr</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="undeploy_module-class_method">
  
    + (<tt>Object</tt>) <strong>undeploy_module</strong>(id, &amp;block) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Undeploy a module
as the first parameter if undeploy failed

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>id</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The deployment id</div>
      
    </li>
  
    <li>
      
        <span class='name'>block</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>Block will be executed when undeploy has completed, an exception will be passed to the block</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


85
86
87
88
89
90</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 85</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_undeploy_module identifier id'>undeploy_module</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_block identifier id'>block</span>
    <span class='rubyid_block identifier id'>block</span> <span class='assign token'>=</span> <span class='rubyid_ARWrappedHandler constant id'>ARWrappedHandler</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_undeployModule identifier id'>undeployModule</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='comma token'>,</span> <span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="undeploy_verticle-class_method">
  
    + (<tt>Object</tt>) <strong>undeploy_verticle</strong>(id, &amp;block) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    Undeploy a verticle
as the first parameter if undeploy failed

  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>id</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>The deployment id  - the undeploy happens asynchronously</div>
      
    </li>
  
    <li>
      
        <span class='name'>block</span>
      
      
        <span class='type'>(<tt>Block</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>Block will be executed when undeploy has completed, an exception will be passed to the block</div>
      
    </li>
  
</ul>


</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


74
75
76
77
78
79</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'src/main/api_shim/container.rb', line 74</span>

<span class='rubyid_def def kw'>def</span> <span class='rubyid_Vertx constant id'>Vertx</span><span class='dot token'>.</span><span class='rubyid_undeploy_verticle identifier id'>undeploy_verticle</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_if if kw'>if</span> <span class='rubyid_block identifier id'>block</span>
    <span class='rubyid_block identifier id'>block</span> <span class='assign token'>=</span> <span class='rubyid_ARWrappedHandler constant id'>ARWrappedHandler</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='rubyid_end end kw'>end</span>
  <span class='rubyid_org identifier id'>org</span><span class='dot token'>.</span><span class='rubyid_vertx identifier id'>vertx</span><span class='dot token'>.</span><span class='rubyid_java identifier id'>java</span><span class='dot token'>.</span><span class='rubyid_platform identifier id'>platform</span><span class='dot token'>.</span><span class='rubyid_impl identifier id'>impl</span><span class='dot token'>.</span><span class='rubyid_JRubyVerticleFactory constant id'>JRubyVerticleFactory</span><span class='dot token'>.</span><span class='rubyid_container identifier id'>container</span><span class='dot token'>.</span><span class='rubyid_undeployVerticle identifier id'>undeployVerticle</span><span class='lparen token'>(</span><span class='rubyid_id identifier id'>id</span><span class='comma token'>,</span> <span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
<span class='rubyid_end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Wed Jul 17 20:30:33 2013 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.6.1 (ruby-1.9.3).
</div>

  </body>
</html>